/**
 * Created by 小敏哥 on 2017/6/26.
 */
import {OVER_LINE_ORDER_DETAIL,OVER_LINE_DOCS} from "./actionsTypes";
import {orderDetails_view,requirements} from './orderDetails';

const overLineOrderDetail = data => ({type: OVER_LINE_ORDER_DETAIL, data: data}); //订单详细信息
const overLineDocs = data => ({type: OVER_LINE_DOCS, data: data});//年检所需资料

//二次封装action，获取orderdetail
export const getOrderDetail=(data, callBack) => {
    return (dispatch, getState) => {
        dispatch(orderDetails_view(data,(result)=>{
            dispatch(overLineOrderDetail(result));
        }))
    }
};

//二次封装action，获取年检所需资料
export const getRequirements=(data, callBack) => {
    return (dispatch, getState) => {
        dispatch(requirements(data,(data)=>{
            dispatch(overLineDocs(data));
        }))
    }
};